import { conventionRoute } from './conventionRoute'
import Loadable from 'react-loadable'
import React from 'react'

export type RoutesItems = {
  path: string
  element: React.ReactElement
  children?: RoutesItems[]
}

//自定义路由
const routerConfig: RoutesItems[] = [
  {
    path: '/',
    element: React.createElement(
      Loadable({
        loader: () => import('@/views/discover/index'),
        loading: () => null
      })
    )
  }
]
export const rootRouterConfig: RoutesItems[] = [...routerConfig.concat(conventionRoute)]
